import {createApp} from "vue";
import Main from './Main.vue'
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'

var app = createApp(Main);
app.use(ElementPlus)

// 配置静态路由表
import User from '@/views/user/User.vue'
import UserDetail from '@/views/user/UserDetail.vue'
import UserEdit from '@/views/user/UserEdit.vue'
import UserStart from '@/views/user/UserStart.vue'
import Home from '@/views/Home.vue'
import {createRouter, createWebHashHistory} from "vue-router";

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/user',
        name: 'User',
        component: User,
        children: [
            {
                path: '',
                name: 'UserStart',
                component: UserStart
            },
            {
                path: 'detail',
                name: 'UserDetail',
                component: UserDetail
            },
            {
                path: 'edit',
                name: 'UserEdit',
                component: UserEdit
            }
        ]
    }
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,linkActiveClass:'active'
})

app.use(router).mount("#app");






